/*
 * Selling Partner API for Solicitations
 *
 * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient's Message Center. The Solicitations API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using software.amzn.spapi.Client;
using software.amzn.spapi.Auth;

using software.amzn.spapi.Model.solicitations.v1;

namespace software.amzn.spapi.Api.solicitations.v1
{
    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface ISolicitationsApi : IApiAccessor
    {
        #region Synchronous Operations
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        CreateProductReviewAndSellerFeedbackSolicitationResponse CreateProductReviewAndSellerFeedbackSolicitation (string amazonOrderId, List<string> marketplaceIds);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>ApiResponse of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo (string amazonOrderId, List<string> marketplaceIds);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>GetSolicitationActionsForOrderResponse</returns>
        GetSolicitationActionsForOrderResponse GetSolicitationActionsForOrder (string amazonOrderId, List<string> marketplaceIds);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>ApiResponse of GetSolicitationActionsForOrderResponse</returns>
        ApiResponse<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderWithHttpInfo (string amazonOrderId, List<string> marketplaceIds);
        #endregion Synchronous Operations
        #region Asynchronous Operations
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        System.Threading.Tasks.Task<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationAsync (string amazonOrderId, List<string> marketplaceIds);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of ApiResponse (CreateProductReviewAndSellerFeedbackSolicitationResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>> CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo (string amazonOrderId, List<string> marketplaceIds);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of GetSolicitationActionsForOrderResponse</returns>
        System.Threading.Tasks.Task<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderAsync (string amazonOrderId, List<string> marketplaceIds);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of ApiResponse (GetSolicitationActionsForOrderResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<GetSolicitationActionsForOrderResponse>> GetSolicitationActionsForOrderAsyncWithHttpInfo (string amazonOrderId, List<string> marketplaceIds);
        #endregion Asynchronous Operations
    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public partial class SolicitationsApi : ISolicitationsApi
    {
        private software.amzn.spapi.Client.ExceptionFactory _exceptionFactory = (name, response) => null;

        /// <summary>
        /// Initializes a new instance of the <see cref="SolicitationsApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public SolicitationsApi(software.amzn.spapi.Client.Configuration configuration)
        {
            this.Configuration = configuration;
            ExceptionFactory = software.amzn.spapi.Client.Configuration.DefaultExceptionFactory;
        }

        IReadableConfiguration IApiAccessor.Configuration 
        {
            get => Configuration;  // Implicit upcast to interface
            set => Configuration = (software.amzn.spapi.Client.Configuration)value;
        }

        /// <summary>
        /// Gets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        public String GetBasePath()
        {
            return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
        }

        /// <summary>
        /// Sets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
        public void SetBasePath(String basePath)
        {
            // do nothing
        }

        /// <summary>
        /// Gets or sets the configuration object
        /// </summary>
        /// <value>An instance of the Configuration</value>
        public software.amzn.spapi.Client.Configuration Configuration {get; set;}

        /// <summary>
        /// Provides a factory method hook for the creation of exceptions.
        /// </summary>
        public software.amzn.spapi.Client.ExceptionFactory ExceptionFactory
        {
            get
            {
                if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
                {
                    throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
                }
                return _exceptionFactory;
            }
            set { _exceptionFactory = value; }
        }

        /// <summary>
        /// Gets the default header.
        /// </summary>
        /// <returns>Dictionary of HTTP header</returns>
        [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
        public IDictionary<String, String> DefaultHeader()
        {
            return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
        }

        /// <summary>
        /// Add default header.
        /// </summary>
        /// <param name="key">Header field name.</param>
        /// <param name="value">Header field value.</param>
        /// <returns></returns>
        [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
        public void AddDefaultHeader(string key, string value)
        {
            this.Configuration.AddDefaultHeader(key, value);
        }

        /// <summary>
        ///  Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        public CreateProductReviewAndSellerFeedbackSolicitationResponse CreateProductReviewAndSellerFeedbackSolicitation (string amazonOrderId, List<string> marketplaceIds)
        {
             ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> localVarResponse = CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo(amazonOrderId, marketplaceIds);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>ApiResponse of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        public ApiResponse< CreateProductReviewAndSellerFeedbackSolicitationResponse > CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo (string amazonOrderId, List<string> marketplaceIds)
        {
            // verify the required parameter 'amazonOrderId' is set
            if (amazonOrderId == null)
                throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
            // verify the required parameter 'marketplaceIds' is set
            if (marketplaceIds == null)
                throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");

            var localVarPath = "/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/hal+json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", this.Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
            if (marketplaceIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateProductReviewAndSellerFeedbackSolicitation", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateProductReviewAndSellerFeedbackSolicitationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateProductReviewAndSellerFeedbackSolicitationResponse)));
        }

        /// <summary>
        ///  Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
        public async System.Threading.Tasks.Task<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationAsync (string amazonOrderId, List<string> marketplaceIds)
        {
             ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> localVarResponse = await CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo(amazonOrderId, marketplaceIds);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of ApiResponse (CreateProductReviewAndSellerFeedbackSolicitationResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>> CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo (string amazonOrderId, List<string> marketplaceIds)
        {
            // verify the required parameter 'amazonOrderId' is set
            if (amazonOrderId == null)
                throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
            // verify the required parameter 'marketplaceIds' is set
            if (marketplaceIds == null)
                throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");

            var localVarPath = "/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/hal+json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", this.Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
            if (marketplaceIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateProductReviewAndSellerFeedbackSolicitation", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateProductReviewAndSellerFeedbackSolicitationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateProductReviewAndSellerFeedbackSolicitationResponse)));
        }

        /// <summary>
        ///  Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>GetSolicitationActionsForOrderResponse</returns>
        public GetSolicitationActionsForOrderResponse GetSolicitationActionsForOrder (string amazonOrderId, List<string> marketplaceIds)
        {
             ApiResponse<GetSolicitationActionsForOrderResponse> localVarResponse = GetSolicitationActionsForOrderWithHttpInfo(amazonOrderId, marketplaceIds);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>ApiResponse of GetSolicitationActionsForOrderResponse</returns>
        public ApiResponse< GetSolicitationActionsForOrderResponse > GetSolicitationActionsForOrderWithHttpInfo (string amazonOrderId, List<string> marketplaceIds)
        {
            // verify the required parameter 'amazonOrderId' is set
            if (amazonOrderId == null)
                throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->GetSolicitationActionsForOrder");
            // verify the required parameter 'marketplaceIds' is set
            if (marketplaceIds == null)
                throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->GetSolicitationActionsForOrder");

            var localVarPath = "/solicitations/v1/orders/{amazonOrderId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/hal+json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", this.Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
            if (marketplaceIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSolicitationActionsForOrder", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSolicitationActionsForOrderResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSolicitationActionsForOrderResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSolicitationActionsForOrderResponse)));
        }

        /// <summary>
        ///  Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of GetSolicitationActionsForOrderResponse</returns>
        public async System.Threading.Tasks.Task<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderAsync (string amazonOrderId, List<string> marketplaceIds)
        {
             ApiResponse<GetSolicitationActionsForOrderResponse> localVarResponse = await GetSolicitationActionsForOrderAsyncWithHttpInfo(amazonOrderId, marketplaceIds);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
        /// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
        /// <returns>Task of ApiResponse (GetSolicitationActionsForOrderResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<GetSolicitationActionsForOrderResponse>> GetSolicitationActionsForOrderAsyncWithHttpInfo (string amazonOrderId, List<string> marketplaceIds)
        {
            // verify the required parameter 'amazonOrderId' is set
            if (amazonOrderId == null)
                throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->GetSolicitationActionsForOrder");
            // verify the required parameter 'marketplaceIds' is set
            if (marketplaceIds == null)
                throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->GetSolicitationActionsForOrder");

            var localVarPath = "/solicitations/v1/orders/{amazonOrderId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/hal+json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", this.Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
            if (marketplaceIds != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSolicitationActionsForOrder", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSolicitationActionsForOrderResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSolicitationActionsForOrderResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSolicitationActionsForOrderResponse)));
        }


        public class Builder
        {
            private LWAAuthorizationCredentials lwaAuthorizationCredentials;
            private RateLimitConfiguration rateLimitConfiguration;

            public Builder SetLWAAuthorizationCredentials(LWAAuthorizationCredentials lwaAuthorizationCredentials)
            {
                this.lwaAuthorizationCredentials = lwaAuthorizationCredentials;
                return this;
            }
            
            
            public Builder SetRateLimitConfiguration(RateLimitConfiguration rateLimitConfiguration)
            {
                this.rateLimitConfiguration = rateLimitConfiguration;
                return this;
            }

            public SolicitationsApi Build() 
            {
                if (lwaAuthorizationCredentials == null) 
                {
                    throw new NullReferenceException("LWAAuthoriztionCredentials not set");
                }

                
                software.amzn.spapi.Client.Configuration configuration = new software.amzn.spapi.Client.Configuration()
                {
                    AuthorizationCredentials = lwaAuthorizationCredentials,
                    RateLimitConfig = rateLimitConfiguration
                };

                // default HTTP connection timeout (in milliseconds)
                configuration.initializeApiClient();
                configuration.Timeout = 100000;

                return new SolicitationsApi(configuration);
            }
        }
        
        private static Multimap<string, string> ConvertHeadersToMultimap(RestResponse response)
        {
            var multimap = new Multimap<string, string>();
            foreach (var header in response.Headers)
            {
                multimap.Add(header.Name, header.Value?.ToString());
            }
            return multimap;
        }


        private static RestSharp.Method ChangeHttpMethod(String httpMethod) {
            switch(httpMethod) {
                case "GET":
                    // GET logic
                    return Method.Get;
                case "POST":
                    // POST logic
                    return Method.Post;
                case "DELETE":
                    return Method.Delete;
                case "PUT":
                    return Method.Put;
                case "PATCH":
                    return Method.Patch;
                case "OPTIONS":
                    return Method.Options;
            }
            return Method.Head;
        }

    }
}
